<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<div id="app">
		<span @click="getMousePos">11</span>
	</div>
	
	<body>
		<script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
		<script type="text/javascript">
			new Vue({
				el: '#app',
				methods:{
					getMousePos(event) {
						var e = event || window.event;
						var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
						var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
						var x = e.pageX || e.clientX + scrollX;
						var y = e.pageY || e.clientY + scrollY;
						console.log(x, y)
					}
				}
			})
		</script>
	</body>
</html>
